package com.molin.innerClass.testLambda;

public class TestSwimming {

    public static void main(String[] args) {
        goSwimming(new Swimming() {
            @Override
            public void swimm() {
                System.out.println("去游泳吧朋友");
            }
        });
        //lambda
        goSwimming(()->{
            System.out.println("去游泳吧朋友");
        });
    }

    public static void goSwimming(Swimming swimming) {
        swimming.swimm();
    }
}


interface Swimming {
    void swimm();
}
